package com.sf.fy.uav.rest;

import com.sf.fy.uav.common.request.operate.SysPromotionStatisticsRequest;
import com.sf.fy.uav.common.response.operational.SysPromotionStatisticsResponse;
import com.sf.fy.uav.common.vo.TotalAmountVo;
import com.sf.fy.uav.entity.PromotionStatistics;
import com.sf.fy.uav.service.IPromotionStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 推广记录表 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-08-18
 */
@RestController
@RequestMapping("/sys/Promotion-statistics")
public class PromotionStatisticsRest {

    @Autowired
    private IPromotionStatisticsService iPromotionStatisticsService;

    public void addPromotionStatistics() {

    }

    public void updatePromotionStatistics() {

    }

    public Long getTotal(@RequestParam(required = false) String phoneNumber, @RequestParam(required = false) String activityId) {
        return iPromotionStatisticsService.getTotal(phoneNumber, activityId);
    }

    public TotalAmountVo getPromotionStatistics(SysPromotionStatisticsRequest sysPromotionStatisticsRequest) {
        return iPromotionStatisticsService.getPromotionStatistics(sysPromotionStatisticsRequest);
    }

    public PromotionStatistics getPromotionStatistics(String userId, String activityId) {
        return iPromotionStatisticsService.getPromotionStatistics(userId, activityId);
    }
}
